﻿

<!DOCTYPE html>
<html lang="en">
    <head>
        <meta charset="utf-8">
        <title>单元素/组件的过渡</title>
		<script src="vue.js"></script>
    <style>
        .fade-enter-active, .fade-leave-active {
            transition: opacity 5s;
        }
        .fade-enter, .fade-leave-to /* .fade-leave-active below version 2.1.8 */ {
            opacity: 0;
        }
    </style>
    </head>
    <body class="docs">
    进入/离开 & 列表过渡 — Vue.js<br />
    https://cn.vuejs.org/v2/guide/transitions.html<br />
    <div id="demo">
        <button v-on:click="show = !show">
            Toggle
        </button>
        <transition name="fade">
            <p v-if="show">hello</p>
        </transition>
    </div>
    </body>
	
<script type="text/javascript">

var app = new Vue({
    el: '#demo',
    data: {
        show: true
    }
});

</script>
	
</html>
